package com.xiaoyu.lanling.event.user

import `in`.srain.cube.request.JsonData
import com.xiaoyu.base.event.BaseJsonEvent
import com.xiaoyu.base.model.User
import com.xiaoyu.lanling.feature.vip.model.VipInfo

class UserMineEvent(requestTag: Any, jsonData: JsonData) : BaseJsonEvent(requestTag, jsonData) {
    val userJsonData = jsonData.optJson("user")
    val user = User.fromJson(userJsonData)
    val age = userJsonData.optInt("age")
    val tag = jsonData.optString("tag")
    val chargeTag = jsonData.optString("chargeTag")
    val soliloquy = jsonData.optString("soliloquy")
    val vipInfo = VipInfo(jsonData.optJson("vipInfo"))
    val photos: MutableList<String> = jsonData.optJson("photos").asList<String>()

    val visitorCount: Int = jsonData.optInt("visitorCount")
}